package com.ctcemti.mdm.project.sys.service;

import com.ctcemti.mdm.common.result.Result;
import com.ctcemti.mdm.project.sys.entity.OrgJob;
import com.github.pagehelper.PageInfo;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface IJobService {
    /**
     * 添加/修改岗位职责
     * @param orgJob
     * @return
     */
    Result insertOrUpdate(OrgJob orgJob);

    /**
     * 导入岗位职责
     * @param jobs
     * @return
     */
    Result importOrgs(List<OrgJob> jobs);

    /**
     * 删除
     * @param idStr
     * @return
     */
    Result delete(String idStr);

    /**
     * 获取岗位职责
     * @param param
     * @return
     */
    PageInfo<OrgJob> getOrgJob(Map<String,Object> param);
    /* *
     * @Author bxf
     * @Description 根据编码查看岗位职责
     * @Date 15:35 2019/9/12
     * @param code
     * @return java.util.List<com.ctcemti.mdm.project.sys.entity.OrgJob>
     */
    List<OrgJob> getJobByCode(String code);

    @Transactional
    Map<String, Object> uploadFile(MultipartFile multipartFile, HttpServletResponse response, HttpServletRequest request) throws IOException;
}
